<?php
App::uses('ExceptionRenderer', 'Error');
class AppExceptionRenderer extends ExceptionRenderer {
public function __construct(Exception $exception) {
  parent::__construct($exception);
}
  	public function render() {
      /*
    }
		if ($this->method) {
			call_user_func_array(array($this, $this->method), array($this->error));
		}*/
     // $prefix = $this->controller->request->params['prefix'];
    //  $this->controller->layout = empty($prefix) ? 'main' : 'default';
    //  $this->controller->layout = 'main';
      if ($this->error instanceof NotFoundException || $this->error instanceof MissingControllerException  || $this->error instanceof MissingActionException) {
        $this-> _outputMessageSafe('error400_custom');
      } else {
        $this-> _outputMessageSafe('error500_custom');
      }
	}
}
?>
